package com.example.oauth2.domain;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsPasswordService;

/**
 * @ClassName JiuBoDouUserPasswordService
 * @Description
 * @Author huyingliang
 * @Date 2024-03-05 11:09
 */
public class JiuBoDouUserPasswordService implements UserDetailsPasswordService {
    @Override
    public UserDetails updatePassword(UserDetails user, String newPassword) {
        JiuBoDouUserDetails jiuBoDouUserDetails = (JiuBoDouUserDetails) user;
        jiuBoDouUserDetails.setPassword(newPassword);
        return jiuBoDouUserDetails;
    }
}
